package com.sls.web.manager.action.game;

import javax.annotation.Resource;

import com.sls.web.manager.action.SuperAction;
import com.sls.web.manager.common.FilterStringSpaces;
import com.sls.web.manager.execption.ManagerException;
import com.sls.web.manager.game.pojo.SnnsOrderBalanceInfo;
import com.sls.web.manager.game.querybean.SnnsOrderBalanceQuery;
import com.sls.web.manager.game.service.SnnsOrderBalanceService;

/**
 * 
 * @description 7996订单结果查询
 * @author Wangxuegang
 * @date 2013-4-24
 */
public class SnnsOrderAction extends SuperAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private SnnsOrderBalanceQuery snnsOrderBalanceQuery;

	@Resource(name = "snnsOrderBalanceService")
	private SnnsOrderBalanceService snnsOrderBalanceService;

	private SnnsOrderBalanceInfo snnsOrderBalanceInfo;

	private String oid;

	/**
	 * 订单列表
	 * 
	 * @return
	 * @throws Exception
	 */
	public String orderList() throws Exception {
		try {
			String ptOrderNo = snnsOrderBalanceQuery.getOid();
			ptOrderNo = FilterStringSpaces.checkStringHasSpace(ptOrderNo);
			snnsOrderBalanceQuery.setOid(ptOrderNo);
			snnsOrderBalanceInfo = snnsOrderBalanceService.queryOrder(
					snnsOrderBalanceQuery, getCurrentOperator());
			return "order_list";
		} catch (ManagerException e) {
			flag = false;
			addActionError(e.getMessage());
		}
		return SUCCESS;
	}

	public SnnsOrderBalanceQuery getSnnsOrderBalanceQuery() {
		return snnsOrderBalanceQuery;
	}

	public void setSnnsOrderBalanceQuery(
			SnnsOrderBalanceQuery snnsOrderBalanceQuery) {
		this.snnsOrderBalanceQuery = snnsOrderBalanceQuery;
	}

	public SnnsOrderBalanceInfo getSnnsOrderBalanceInfo() {
		return snnsOrderBalanceInfo;
	}

	public void setSnnsOrderBalanceInfo(
			SnnsOrderBalanceInfo snnsOrderBalanceInfo) {
		this.snnsOrderBalanceInfo = snnsOrderBalanceInfo;
	}

	public String getOid() {
		return oid;
	}

	public void setOid(String oid) {
		this.oid = oid;
	}

}
